package com.xinzhi.savingpot.task.controller;

import com.xinzhi.savingpot.task.mapper.TaskCheckMapper;
import com.xinzhi.savingpot.task.service.impl.TaskCheckServiceImpl;
import com.xinzhi.savingpot.util.BaseResponse;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.CrossOrigin;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.io.IOException;

@RestController
@Api("任务审核")
@RequestMapping("/taskCheck")
@CrossOrigin
public class TaskCheckController {

    @Autowired
    private TaskCheckServiceImpl taskCheck;

    @ApiOperation("待审核列表")
    @PostMapping("/getCheckList")
    public BaseResponse getCheckList(Integer stateID) throws IOException {
        return taskCheck.getTaskCheckList(stateID);
    }
}
